﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.IO;

namespace OpenQuarters.EntityBase
{
    public static class DebugHelper
    {
        public static void Write(string info)
        {
            string debugLocation = ConfigurationManager.AppSettings["EntityBaseDebugLocation"];
            if (debugLocation != null && File.Exists(debugLocation))
            {
                try
                {
                    File.AppendAllText(debugLocation, DateTime.Now.ToString("u") + ": " + info + "\n");
                }
                catch { }
            }
        }
    }
}
